package cn.edu.hhtc.stsystem.struts2.main;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.opensymphony.xwork2.ActionSupport;

/**
 * 系统主界面入口.
 * 
 * @author linyueqin
 * 
 */
@Results({
		@Result(name = "cook_main", location = "/WEB-INF/content/basic_info/cook/cook_main.jsp"),
		@Result(name = "cook_edit", location = "/WEB-INF/content/basic_info/cook/cook_edit.jsp"),
		@Result(name = "cook_add", location = "/WEB-INF/content/basic_info/cook/cook_add.jsp"),
		@Result(name = "fodder_main", location = "/WEB-INF/content/basic_info/fodder/fodder_main.jsp"),
		@Result(name = "fodder_edit", location = "/WEB-INF/content/basic_info/fodder/fodder_edit.jsp"),
		@Result(name = "fodder_add", location = "/WEB-INF/content/basic_info/fodder/fodder_add.jsp"),
		@Result(name = "supplier_main", location = "/WEB-INF/content/basic_info/supplier/supplier_main.jsp"),
		@Result(name = "supplier_edit", location = "/WEB-INF/content/basic_info/supplier/supplier_edit.jsp"),
		@Result(name = "supplier_add", location = "/WEB-INF/content/basic_info/supplier/supplier_add.jsp"),
		@Result(name = "instock_main", location = "/WEB-INF/content/instock_manage/instock_main.jsp"),
		@Result(name = "instock_query", location = "/WEB-INF/content/instock_manage/instock_query.jsp"),
		@Result(name = "instock_showOrdering", location = "/WEB-INF/content/instock_manage/instock_showOrdering.jsp"),
		@Result(name = "instock_ajaxGetFodder", location = "/WEB-INF/content/instock_manage/instock_ajaxGetFodder.jsp"),
		@Result(name = "stock_main", location = "/WEB-INF/content/stock_manage/stock/stock_main.jsp"),
		@Result(name = "stock_query", location = "/WEB-INF/content/stock_manage/stock/stock_query.jsp"),
		@Result(name = "user_add", location = "/WEB-INF/content/sys_manage/user/user_add.jsp"),
		@Result(name = "user_edit", location = "/WEB-INF/content/sys_manage/user/user_edit.jsp"),
		@Result(name = "authority_main", location = "/WEB-INF/content/sys_manage/authority/authority_main.jsp") })
public class DemoAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1962597309924515866L;

	@Action("/cook/main")
	public String showCookMain() throws Exception {

		return "cook_main";
	}

	@Action("/cook/ajaxGetEdit")
	public String ajaxGetEditCook() throws Exception {

		return "cook_edit";
	}

	@Action("/cook/ajaxGetAdd")
	public String ajaxGetAddCook() throws Exception {

		return "cook_add";
	}

	@Action("/fodder/main")
	public String showFodderMain() throws Exception {

		return "fodder_main";
	}

	@Action("/fodder/ajaxGetEdit")
	public String ajaxGetEditFodder() throws Exception {

		return "fodder_edit";
	}

	@Action("/fodder/ajaxGetAdd")
	public String ajaxGetAddFodder() throws Exception {

		return "fodder_add";
	}

	@Action("/supplier/main")
	public String showSupplierMain() throws Exception {

		return "supplier_main";
	}

	@Action("/supplier/ajaxGetEdit")
	public String ajaxGetEditSupplier() throws Exception {

		return "supplier_edit";
	}

	@Action("/supplier/ajaxGetAdd")
	public String ajaxGetAddSupplier() throws Exception {

		return "supplier_add";
	}

	@Action("/instock/main")
	public String showInstockMain() throws Exception {

		return "instock_main";
	}

	@Action("/instock/ajaxShowSupplierFodder")
	public String ajaxGetFodder() throws Exception {

		return "instock_ajaxGetFodder";
	}

	@Action("/instock/query")
	public String getInstockQuery() throws Exception {

		return "instock_query";
	}

	@Action("/instock/showOrdering")
	public String showOrdering() throws Exception {

		return "instock_showOrdering";
	}

	@Action("/stock/query")
	public String getStockQuery() throws Exception {

		return "stock_query";
	}

	@Action("/stock/main")
	public String showStockMain() throws Exception {

		return "stock_main";
	}

	@Action("/user/ajaxGetAdd")
	public String ajaxGetAddUser() throws Exception {

		return "user_add";
	}

	@Action("/user/ajaxGetEdit")
	public String ajaxGetEditUser() throws Exception {

		return "user_edit";
	}

	@Action("/authority/main")
	public String showAuthorityMain() throws Exception {

		return "authority_main";
	}
}
